Help Jack maximize the value of treasures within his backpack's weight limit
Help Jack maximize the total value of treasures by selecting items with the best value-to-weight ratio within his backpack's weight capacity using Branch and Bound.
Items:
Output: 110.00
Items:
Output: 70.00
Output: 50.00 (select item 2)
Worst case, but pruning reduces nodes explored
For queue and recursion stack
| Node ID | Level | Profit | Weight | Bound | Action |
|---|
Example 1: u=2, v=10, weights=[5,5], values=[50,60] → 110.00
Example 2: u=3, v=6, weights=[1,1,3], values=[10,20,40] → 70.00
Worst case, reduced by pruning
For queue and recursion stack